﻿@using StackExchange.DataExplorer
@using StackExchange.DataExplorer.Models
<!DOCTYPE html>
<html>
<head>
    @{Site site = Current.Controller.Site;}
    <title>@Html.Raw((string)ViewData["PageTitle"])</title>
    @if (site != null)
    {
        @Html.Raw(string.Format("<link rel=\"odata.service\" title=\"{0}\" href=\"{1}\"/>", site.Name, site.ODataEndpoint))
    }
    @Html.Raw(AssetPackager.LinkCss("sitecss"))
    @RenderSection("additionalStyles", required: false)

    @Html.Raw(AssetPackager.ScriptSrc("jquery"))
    @Html.Raw(AssetPackager.ScriptSrc("master"))
    @StackExchange.Profiling.MiniProfiler.RenderIncludes()

    <script type="text/javascript">
        DataExplorer.init({
            'User.id': @(Current.User.IsAnonymous ? "null" : Current.User.Id.ToString()),
            'User.guessedID': @(ViewData["GuessedUserId"] != null ? ViewData["GuessedUserId"] : "null"),
            'User.hideSchema': @((Current.User.HideSchema == true).ToString().ToLower()),
            'User.isAuthenticated': @((!Current.User.IsAnonymous).ToString().ToLower()),
            'Site.id': @(Current.Controller.Site != null ? Current.Controller.Site.Id.ToString() : "null"),
            'WhitelistEnabled': @(AppSettings.EnableWhiteList.ToString().ToLower())
        });
    </script>
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="topbar">
                <div id="hlinks">
                    <div id="hlinks-content">
                        @Html.Partial("LogInUserControl")
                        <span class="link-separator">|</span> <a href="/about">about</a> <span class="link-separator">
                            |</span> <a href="/faq">faq</a>
                    </div>
                    @if (site != null)
                    {
                        <span id="search">
                            <form method="get" action="/@site.Name.ToLower()/queries">
                            @Html.TextBox("q", "", new { id = "searchtext", tabindex = 1, maxlength = 80, size = 28, placeholder = "search" })
                            </form>
                        </span>
                    }
                </div>
            </div>
            <div class="clear">
            </div>
            <div id="title">
                <div id="hlogo">
                    <a href="/" title="Stack Exchange Data Explorer">
                        <img src="/Content/images/see_logo.png" alt="Stack Exchange Data Explorer" width="318"
                            height="91" />
                    </a>
                </div>
                @Html.Partial("Menu", ViewData["Menu"])
                <script type="text/javascript">
                    DataExplorer.initComposeButton({
                        IconUrl: '/icon/@Current.Controller.Site.Id',
                        LongName: '@Current.Controller.Site.LongName'
                    });
                </script>
            </div>
            <div class="clear">
            </div>
        </div>
        @Html.Partial("SubHeader",ViewData["Header"])
        @RenderBody()
        @RenderSection("SecondaryContent", required: false)
    </div>
    <div id="footer">
        <div class="footerwrap">
            <div id="footer-menu">
                <a href="/about">about</a> | <a href="/faq">faq</a> | <a href="http://blog.stackexchange.com">
                    blog</a> | <a href="http://data.stackexchange.com">data</a> | <a href="http://blog.stackoverflow.com/category/podcasts/">
                        podcast</a> | <a href="/legal">legal</a> | <strong><a href="mailto:team@stackoverflow.com">
                            contact us</a></strong> | <strong><a href="http://meta.stackoverflow.com">feedback</a></strong>
                <div id="footer-sites">
                    <span style="color:#FE7A15;font-size:140%">■</span>&nbsp;<a href="http://stackoverflow.com">stackoverflow.com</a>&nbsp; 
                    <span style="color:#FE7A15;font-size:140%">■</span>&nbsp;<a href="http://stackapps.com">api/apps</a>&nbsp; 
                    <span style="color:#FE7A15;font-size:140%">■</span>&nbsp;<a href="http://careers.stackoverflow.com">careers</a>&nbsp; 
                    <span style="color:#E8272C;font-size:140%">■</span>&nbsp;<a href="http://serverfault.com">serverfault.com</a>&nbsp; 
                    <span style="color:#00AFEF;font-size:140%">■</span>&nbsp;<a href="http://superuser.com">superuser.com</a>&nbsp; 
                    <span style="color:#969696;font-size:140%">■</span>&nbsp;<a href="http://meta.stackoverflow.com">meta</a>&nbsp; 
                    <span style="color:#46937D;font-size:140%">■</span>&nbsp;<a href="http://area51.stackexchange.com">area&nbsp;51</a>&nbsp; 
                    <span style="color:#C0D0DC;font-size:140%">■</span>&nbsp;<a href="http://webapps.stackexchange.com">webapps</a>&nbsp; 
                    <span style="color:#000000;font-size:140%">■</span>&nbsp;<a href="http://gaming.stackexchange.com">gaming</a>&nbsp; 
                    <span style="color:#dd4814;font-size:140%">■</span>&nbsp;<a href="http://askubuntu.com">ubuntu</a>&nbsp; 
                    <span style="color:#9ce4fe;font-size:140%">■</span>&nbsp;<a href="http://webmasters.stackexchange.com">webmasters</a>&nbsp; 
                    <span style="color:#cf4d3f;font-size:140%">■</span>&nbsp;<a href="http://cooking.stackexchange.com">cooking</a>&nbsp; 
                    <span style="color:#f4f28d;font-size:140%">■</span>&nbsp;<a href="http://gamedev.stackexchange.com">game development</a>&nbsp; 
                    <span style="color:#0f3559;font-size:140%">■</span>&nbsp;<a href="http://math.stackexchange.com">math</a>&nbsp; 
                    <span style="color:#f2f2f2;font-size:140%">■</span>&nbsp;<a href="http://photo.stackexchange.com">photography</a>&nbsp; 
                    <span style="color:#037187;font-size:140%">■</span>&nbsp;<a href="http://stats.stackexchange.com">stats</a>&nbsp; 
                    <span style="color:#f1e7cc;font-size:140%">■</span>&nbsp;<a href="http://tex.stackexchange.com">tex</a>&nbsp; 
                    <span style="color:#e1cdae;font-size:140%">■</span>&nbsp;<a href="http://english.stackexchange.com">english</a>&nbsp; 
                    <span style="color:#a2d9f6;font-size:140%">■</span>&nbsp;<a href="http://cstheory.stackexchange.com">theoretical cs</a>&nbsp; 
                    <span style="color:#1b3e6c;font-size:140%">■</span>&nbsp;<a href="http://programmers.stackexchange.com">programmers</a>&nbsp; 
                    <span style="color:#293a5d;font-size:140%">■</span>&nbsp;<a href="http://unix.stackexchange.com">unix</a>&nbsp;
                    <span style="color:#bec0cb;font-size:140%">■</span>&nbsp;<a href="http://apple.stackexchange.com">apple</a>&nbsp;
                    <span style="color:#939185;font-size:140%">■</span>&nbsp;<a href="http://wordpress.stackexchange.com">wordpress</a>&nbsp;
                    <span style="color:#ebf5f5;font-size:140%">■</span>&nbsp;<a href="http://physics.stackexchange.com">physics</a>&nbsp;
                    <span style="color:#4176ab;font-size:140%">■</span>&nbsp;<a href="http://diy.stackexchange.com">home&nbsp;improvement</a>&nbsp;
                    <span style="color:#d1d8d7;font-size:140%">■</span>&nbsp;<a href="http://gis.stackexchange.com">gis</a>&nbsp;
                    <span style="color:#e5e2d3;font-size:140%">■</span>&nbsp;<a href="http://electronics.stackexchange.com">electronics</a>&nbsp;
                    <span style="color:#a4c639;font-size:140%">■</span>&nbsp;<a href="http://android.stackexchange.com">android</a>&nbsp;
                    <span style="color:#2e4e60;font-size:140%">■</span>&nbsp;<a href="http://security.stackexchange.com">security</a>&nbsp;
                    <span style="color:#45bcb5;font-size:140%">■</span>&nbsp;<a href="http://bicycles.stackexchange.com">bicycles</a>&nbsp;
                    <span style="color:#00adee;font-size:140%">■</span>&nbsp;<a href="http://dba.stackexchange.com">dba</a>&nbsp;
                    <span style="color:#2edaf0;font-size:140%">■</span>&nbsp;<a href="http://drupal.stackexchange.com">drupal</a>&nbsp;
                    <span style="color:#213951;font-size:140%">■</span>&nbsp;<a href="http://sharepoint.stackexchange.com">sharepoint</a>&nbsp;
                </div>
            </div>
            <div id="footer-flair">
                <a href="http://creativecommons.org/licenses/by-sa/3.0/" class="cc-wiki-link"></a>
                <div id="revision">rev @GlobalApplication.AppRevision</div>
            </div>
            <div id="copyright">
                site design / logo &copy; @DateTime.UtcNow.Year stack exchange inc; 
                    user contributions licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/"
                        rel="license">cc-wiki</a> with <a href="http://blog.stackoverflow.com/2009/06/attribution-required/"
                            rel="license">attribution required</a>
            </div>
        </div>

        @if (HttpContext.Current.IsDebuggingEnabled)
        { 
            <div style="margin-top:15px;color:#d99;">Debugging is enabled</div>
        }

    </div>
    <noscript>
        <div id="noscript-warning">
            Data Explorer works best with JavaScript enabled</div>
    </noscript>
    @Html.Raw(Current.GoogleAnalytics)
</body>
</html>
